// 
import axiosp from '@/apis/axios/indexp.js'
const baseUrl = `/erp/bill`

// 
export function initAddBill(params) {
	return axiosp.request({
		url: `${baseUrl}/sale/initAddBill`,
		method: 'post',
		data: params
	})
}


// 新增销售单
export function addData(params) {
	return axiosp.request({
		url: `${baseUrl}/sale/addData`,
		method: 'post',
		data: params
	})
}

// 修改销售单
export function updateData(params) {
	return axiosp.request({
		url: `${baseUrl}/sale/updateData`,
		method: 'post',
		data: params
	})
}


//删除销售单
export function deleteById(params) {
	return axiosp.request({
		url: `${baseUrl}/sale/deleteById`,
		method: 'post',
		data: params
	})
}
// 新增销售单
export function updateViewBillAndDetailsByBillId(params) {
	return axiosp.request({
		url: `${baseUrl}/sale/viewBillAndDetailsByBillId`,
		method: 'post',
		data: params
	})
}

// 审核
export function audit(params) {
	return axiosp.request({
		url: `${baseUrl}/sale/audit`,
		method: 'post',
		data: params
	})
}

// 作废
export function saleCancel(params) {
	return axiosp.request({
		url: `${baseUrl}/sale/cancel`,
		method: 'post',
		data: params
	})
}

